# Codebook

## This file contains a rough codebook for our two datasets: agency and our aggregated county. We directly use BG and HPBM's replication materials that are freely available via the AEJ website so visit there for more details on those datasets. 

### city-aggregate.RData
Total Observations: 48,119

Columns: 144

- `City`: city name
- `State`: state name
- `year`: year of data (2010-2015)
- `Population`: population size
- `Violent_crime` through `allcrimewithna`: the sum of each type of crime 
* Note, the `allcrimewithna` variable reflects a differential calculation of crime numbers dropping problematic crime observations (see supplementary materials)
- `Population_rate` through `allcrimewithna_rate`: the rate of each type of crime
* Note, the `allcrimewithna_rate` variable reflects a differential calculation of crime numbers dropping problematic crime observations (see supplementary materials)
- `Id2`: unique id for city-state pair
- `unemployment`: unemployment rate, from the Census Bureau
- `medianhouseholdincome`: median household income, from the Census Bureau
- `percentinpoverty`: percent in poverty, from the Census Bureau
- `PCPI`: per capita personal income, from the Census Bureau
- `popmales`: the number of men in the population, from the Census Bureau
- `pop1519` through `pop2534`: the population size of each demographic group, from the Census Bureau
- `percblack`: the percent of the population that is Black, from the Census Bureau
- `Total_Population`: total population
- `Murder_ArrestRate` through `Assault_ArrestRate`: arrest rates by crime type
- `sumawards_BGGears` through `sumallLESOquantityHARRIS` reflect our calculation of BG and HPBM's main variables, the sum of either value or quantity by equipment type (vehicles, weapons, etc.; see file 7)
* `sumawards_BGGears_log` through `sumawards_HWeapons_log` are the logged values of these same variables
* note, `sumallLESOaidBG` and `sumallLESOaidHARRIS` are identical 
- `usmilex` is US military spending per year
- `lagusmilex` is lagged US military spending per year
- `ind` and `Aid1` help us calculate BG instrument (see file 9)
- `g` is a unique indicator for each city-state pair
- `milex_iv` is the BG instrument (see file 9)
- `sharemales`: the proportion of men in the population, from the Census Bureau
- `share1519` through `share2534`: percent of the population by each demographic group, from the Census Bureau
- `logpop`: logged population
* this is the variable to use in the BG models (not the other population variables)
- `logmedianhouseholdincome`: logged median household income
- `DLALewisMcChordWA` through `DLAMechanisburgPA`: distance to each of these DLA centers
- `landareamiles`: land area, in miles, of the city
- `landareamiles`: land area, in meters, of the city
- `closestFACs`: distance to the closest FAC among the DLA centers listed above (see file 8)
- `sixthclosestFACs`: distance to the sixth closest FAC among the DLA centers listed above (see file 8)
- `IS_HIDTA`: dummy variable for whether the city is designated as a HIDTA
- `SumUSitems`: the sum of all items distributed in the US by year
- `zHUdI1` through `zHUdIhidta_lag`: instrument calculations, following HPBM (see file 8)
- `sumallLESOaidBG_lag` through `SumUSitems_lag`: lagged versions of the variables above
- `state_numeric`: unique number (1-51) for each state
- `state_year`: multiply state by year to get a unique indicator for each state-year pair (see BG)

### county-aggregate.RData
Total Observations: 15,685

Columns: 133 

- `County`: county name
- `State`: state name
- `year`: year of data (2010-2014)
- `sumawards_BGGears` through `sumallLESOquantityHARRIS` reflect our calculation of BG and HPBM's main variables, the sum of either value or quantity by equipment type (vehicles, weapons, etc.; see file 7)
- `state.fips`: state FIPS code
- `county.fips`: county FIPS code
- `state_abbrv`: state abbreviation
- `VIOL_countysumrate` through `allcrime_countysumrate`: the rate of each type of crime
- `missingdata`: an indicator for whether the county was missing all crime data in that year (see the supplementary material for more information)
- `lessthan100coverage`: an indicator for whether the county was missing some crime data in that year (less than 100%; see the supplementary material for more information)
- `unemployment`: unemployment rate, from the Census Bureau
- `medianhouseholdincome`: median household income, from the Census Bureau
- `percentinpoverty`: percent in poverty, from the Census Bureau
- `PCPI`: per capita personal income, from the Census Bureau
- `popmales`: the number of men in the population, from the Census Bureau
- `pop1519` through `pop2534`: the population size of each demographic group, from the Census Bureau
- `percblack`: the percent of the population that is Black, from the Census Bureau
- `Population`: total population
- `P1VLNT_ArrestRate` through `DRGPOSS_ArrestRate`: arrest rates for each type of crime
- `usmilex` is US military spending per year
- `lag_milex` is lagged US military spending per year
- `Aid1` helps us calculate BG instrument (see file 9)
- `g` is a unique indicator for each county-state pair
- `milex_iv` is the BG instrument (see file 9)
- `sharemales`: the proportion of men in the population, from the Census Bureau
- `share1519` through `share2534`: percent of the population by each demographic group, from the Census Bureau
- `logpop`: logged population
- `logmedianhouseholdincome`: logged median household income
- `DLALewisMcChordWA` through `DLAMechanisburgPA`: distance to each of these DLA centers
- `landareamiles`: land area, in miles, of the county
- `landareamiles`: land area, in meters, of the county
- `closestFACs`: distance to the closest FAC among the DLA centers listed above (see file 8)
- `sixthclosestFACs`: distance to the sixth closest FAC among the DLA centers listed above (see file 8)
- `IS_HIDTA`: dummy variable for whether the county is designated as a HIDTA
- `SumUSitems`: the sum of all items distributed in the US by year
- `zHUdI1` through `zHUdIhidta_lag`: instrument calculations, following HPBM (see file 8)
- `sumallLESOaidBG_lag` through `SumUSitems_lag`: lagged versions of the variables above
- `state_numeric`: unique number (1-51) for each state
- `state_year`: multiply state by year to get a unique indicator for each state-year pair (see BG)
